package com.ls.thread.xgCarthroughBridge;

public class CarThroughLightThreadTest{
	public static void main(String[] args) {
		int count = 100;
		boolean light = true;
		Runnable control = new CarThroughLightThread(light,count);
		for(int i = 0 ;i<count;i++){
			Thread car = new Thread(control);
			car.setName("car0"+(i+1));
			car.start();
		}
		/*Thread car01 = new Thread(control);
		Thread car02 = new Thread(control);
		Thread car03 = new Thread(control);
		Thread car04 = new Thread(control);
		Thread car05 = new Thread(control);
		Thread car06 = new Thread(control);
		Thread car07 = new Thread(control);
		Thread car08 = new Thread(control);
		Thread car09 = new Thread(control);
		Thread car10 = new Thread(control);
		
		car01.setName("car01");
		car03.setName("car02");
		car04.setName("car03");
		car05.setName("car04");
		car06.setName("car05");
		car07.setName("car06");
		car02.setName("car07");
		car08.setName("car08");
		car09.setName("car09");
		car10.setName("car10");
		
		car01.start();
		car02.start();
		car03.start();
		car04.start();
		car05.start();
		car06.start();
		car07.start();
		car08.start();
		car09.start();
		car10.start();*/
	}
}
